home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 50
/
Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso
/
Aminet
/
text
/
edit
/
tecoc-146.lha
/
exeey.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-05
|
1KB
|
51 lines
/*****************************************************************************
ExeEY()
This function executes an EY command.
*****************************************************************************/
#include "zport.h" /* define portability identifiers */
#include "tecoc.h" /* define general identifiers */
#include "defext.h" /* define external global variables */
DEFAULT ExeEY() /* execute an EY command */
{
BOOLEAN ColonMod;
DBGFEN(1,"ExeEY",NULL);
ColonMod = (CmdMod & COLON); /* is it :EY ? */
CmdMod &= ~COLON; /* clear modifiers flags */
GapBeg = EBfBeg; /* clear the... */
GapEnd = EBfEnd; /* ...edit buffer */
if (IsEofI[CurInp]) { /* if at end-of-file */
if (ColonMod) { /* if it's :EY */
DBGFEX(1,DbgFNm,"PushEx(0)");
return PushEx(0L, OPERAND);
} else {
EStTop = EStBot; /* clear expression stack */
DBGFEX(1,DbgFNm,"SUCCESS");
return SUCCESS;
}
}
if (RdPage() == FAILURE) { /* read a page */
DBGFEX(1,DbgFNm,"FAILURE");
return FAILURE;
}
if (ColonMod) { /* if it's :EY */
DBGFEX(1,DbgFNm,"PushEx(-1)");
return PushEx(-1L, OPERAND);
}
EStTop = EStBot; /* clear expression stack */
DBGFEX(1,DbgFNm,"SUCCESS");
return SUCCESS;
}